package AppCode;

public class PictureProxy extends Subject{
    private Subject app;

    public PictureProxy(Subject app) {
        this.app = app;
    }

    @Override
    public boolean run() {
        preRequest();
        app.run();
        postRequest();
        return true;
    }

    public boolean preRequest(){
        System.out.println("点击图片，加载程序");
        return true;
    }

    public boolean postRequest(){
        System.out.println("加载程序结束");
        return true;
    }

}
